package com.gy.niuer.controller;


import com.gy.niuer.domain.Scheduling;
import com.gy.niuer.service.SchedulingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/scheduling")
@CrossOrigin
public class SchedulingController {

    @Autowired
    SchedulingService schedulingService;

    @GetMapping("/getScheduling/{doctor}")
    public List<Scheduling> getScheduling(@PathVariable int doctor){
        List<Scheduling> schedulings = schedulingService.selectSchedulingByDoctor(doctor);
        return schedulings;

    }
}
